package model.protocal
{
	import model.context.DeviceMonitorContext;
	
	import mx.logging.ILogger;
	
	import utils.DialogUtil;
	import utils.LogUtil;
	
	/***
	 *  文件名: DeleteAlarmProtocalCommand.as
	 *  简介: 删除报警协议
	 *  作者:  kant
	 *  时间:  Dec 8, 2012 9:13:26 PM
	 *
	 **/
	public class DeleteAlarmProtocal extends DeviceProtocal
	{
		private var _idString:String;
		public static var NAME : String = "DeleteAlarmProtocal.as";
		private var logger:ILogger =  LogUtil.getInst().getLogger( NAME );
		
		public function DeleteAlarmProtocal(context:DeviceMonitorContext=null)
		{
			super(context);
		}
		
		public function get idString():String
		{
			return _idString;
		}

		public function set idString(value:String):void
		{
			_idString = "id[]=" + value;
		}

		override protected function getBaseProtocalRootUrl():String{
			return super.getBaseProtocalRootUrl()  + "interface-cancelMemberDeviceAlarms&";
		}
		
		override public function getProtocal():String {
			return getBaseProtocalRootUrl().concat(_idString);
		}
		
		override public function onResponseHandler(evt:Object):void
		{
			var msg:String = "删除报警信息成功!"; 
			logger.info(msg);
			DialogUtil.openInfo(msg, "信息");
		}
	}
}